package com.chen.corejava;
/**
 *@author：email: <a href="cyb@ewppay.com"> Administrator </a> 
 *@Date 2017-2-14 下午4:08:43 
 */

public class CloneTest {

	/**
	 * @param @param args   
	 * @return void  
	 * @throws
	 * @author cyb
	 * @date 2017-2-14
	 */
	public static void main(String[] args) {
		Employee original = new Employee("jon",50000);
		original.setHireDay(2000, 10, 1);
		try {
			Employee copy = original.clone();
			copy.raiseSalary(10);
			copy.setHireDay(3000, 10, 1);
			System.out.println("original=" + original);
			System.out.println("copy=" + copy);
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
	}

}
